import { axios } from "../../utils/request";
//凭证类别管理
const api = {
    pagelist: "/erp/voucherClass/getList",
    save: "/erp/voucherClass/save",
    remove: "/erp/voucherClass/delete",
    getDefault: "/erp/voucherClass/getDefaultList",
};


/**
 * 获取列表
 */
export function pageList(data) {
    return axios({
        url: api.pagelist,
        method: "get",
        params: data,
    });
}
/**
 * 获取默认列表 
 */
export function getDefault(data) {
    return axios({
        url: api.getDefault,
        method: "get",
        params: data,
    });
}

/**
 * 新增/修改
 * @param {*} data
 */
export function save(data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    });
}

/**
 * 删除
 */
export function deleteAccount(data) {
    return axios({
        url: api.remove,
        method: "post",
        data: data
    });
}